<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<%@ page import="com.josiejune.documentdispatch.models.Operator" %>
<%@ page import="com.josiejune.documentdispatch.handlers.OperatorHandler" %>
<%@ page import="com.josiejune.documentdispatch.models.DAO" %>
<%@ page import="com.googlecode.objectify.Key" %>
<%@ page import="java.net.URLEncoder" %>


<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<title>Edit Operator</title> 
	
  <link rel="stylesheet" href="styles/stencil/screen.css" type="text/css" media="screen" charset="utf-8" /> 
  <link rel="stylesheet" href="styles/stencil/print.css" type="text/css" media="print" charset="utf-8" /> 
  <link rel="stylesheet" href="styles/stencil/custom.css" type="text/css" media="screen" title="no title" charset="utf-8" /> 
  <link href="styles/stencil/lib/plugins/forms.css" rel="stylesheet" type="text/css" /> 
  <link href="styles/stencil/lib/plugins/buttons.css" rel="stylesheet" type="text/css" /> 
  <link href="styles/stencil/lib/plugins/grid.css" rel="stylesheet" type="text/css" /> 
  <link href="styles/stencil/lib/typography.css" rel="stylesheet" type="text/css" /> 
</head> 
<body id="index"> 
 
<div id="page" class="xgrid xfluid"> 
	
	<div id="header" class="x12">		
		<div class="xpad"> 
			<h1>Edit Operator</h1>		
		</div> 
	</div> 
<%@ include file="headermenu.jsp" %>
<div class="x5" />
	<% 
	String opId = request.getParameter("opId");
%>
<form action="/updateoperator?opId=<%= URLEncoder.encode(opId, "UTF-8") %>" method="post" class="stn-form label-inline simple"> 

<%
	DAO dao = new DAO();
	Operator operator = dao.ofy().get(new Key<Operator>(Operator.class, Long.valueOf(opId)));
	
	
	%>


<div class="field" class="x5">
	Operator Name: <%= operator.getOpName() %>
</div>
<br/>

<div class="field">
	Email Address
	<input id="email" name="email" size="20" type="text" value="<%= operator.getEmailAddr() %>"/>
</div>
<br/>

<br/>
<div class="field">

	<input type="checkbox" name="includeAttachments" value="true" 
	<% if (operator.isIncludeAttOnEmail()) { %>
		checked
	<% } %>
	/>Include Attachments with Notification
</div>
<br/>
<div class="field">
	SMS Number
	<input id="sms" name="sms" size="20" type="text" value="<%= operator.getSmsNumber() %>"/>
</div>
<br/>
<div class="field">
	Dwell Time Between Orders
	<input id="dwellTimeBetweenOrders" name="dwellTimeBetweenOrders" size="5" type="text" value="<%= operator.getDwellTimeBetweenOrders() %>"/>
</div>
<br/>

   <input type="submit" value="Update" ></input>
	
</form> 
</div>


</body> 
</html>